/*
 * Copyright (c) 2024. hallele, Inc All rights reserved.
 */

package cn.hallele.ms.portalcenter.model.repository;

import cn.hallele.ms.portalcenter.model.entity.UserRoleEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * UserRoleRepository
 *
 * @author anle5
 * @since 2024/5/29 23:22
 */
public interface UserRoleRepository extends JpaRepository<UserRoleEntity, Long>, JpaSpecificationExecutor<UserRoleEntity> {
    /**
     * 通过用户id查询角色
     *
     * @param userId 用户id
     * @return 角色集合
     */
    List<UserRoleEntity> findByUserId(Long userId);
}
